import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Window 2.14
import QtQuick.Layouts 1.12
Window {
    id: openStream
    title:"打开网络流"
    width:400
    height: 105
    visible: true

    Rectangle {
        x:parent.x+10
        id:rect1
        width: 400-20
        height: 60
        //color: "lightgray" // 设置容器背景色
        border.color: "#eee" // 设置边框颜色
        border.width: 1 // 设置边框宽度

        TextArea {

            id: textInput
            //verticalAlignment: Text.AlignVCenter // 设置文本垂直居中
            width: 500
            height:parent.height
            selectByMouse:true
            wrapMode: Text.WrapAnywhere
            anchors.fill: parent // 使 TextInput 填充整个 Rectangle
            anchors.margins: 2 // 设置内边距
            font.pixelSize: 14 // 设置字体大小
            color: "black" // 设置文本颜色
         //   verticalAlignment: Qt.AlignTop

        }

    }

    Button{
        y:rect1.y+10+rect1.height

        anchors.horizontalCenter: rect1.horizontalCenter
        text:"确定"
        width: 50
        height: 30

        onClicked:{

           //console.log("click:",textInput.text)
           player.startPlay(textInput.text);
           openStream.close()
        }
    }

}
